package com.lebang.model.enums.buss;

/**
 * 任务类型
 * @className SessionStatus
 * @author weizx
 * @date 2018年6月27日 上午11:52:25
 */
public enum TaskCategory {
	/**
	 * 任务类型
	 * @className SessionStatus
	 * @author weizx
	 * @date 2018年6月27日 上午11:52:25
	 */
	Empty("其他任务", 0),
	Soso("搜搜任务", 1),
	//Focus("关注任务", 2),
	//Shared("分享任务", 3),
	Lottery("抽奖任务", 4),
	//Activity("活动任务", 5),
	Redpacket("红包任务", 6),
	Invite("邀请好友", 7),
	PonitWall("积分墙", 8),
	Common("通用任务", 9),
	Apps("应用软件",10),
	//Rouse("唤醒任务",11),
	ClockIn("每日签到",12),
	Multiword("多词任务",13),
	PonitWall_YM("有米积分墙", 8),
	PonitWall_DL("点乐积分墙", 8),
	Comments("评论任务",17),
	TaoBaoLook("淘宝浏览任务",16),

	TASK_NEW_HAND("新手任务的通用任务",17),
	Redbook("小红书任务",23),
	CHUANGSHANJIA("穿山甲看视频",22),
	ZPCJ("转盘抽奖",24),
	MDGG("幂动广告",25),
	GDT("广点通",26),
	BAIDUSP("百度视频",27),
	CSJ_ZXR("每日必赚",28),
	EAT_EARNS("吃饭赚",29),
	SLEEP_EARNS("睡觉赚",30),
	WALK_EARNS("走路赚",31),
	KUAI_SHOU("快手视频",32),
	MASTER("师徒返利",33),
	DAY_CLICK("每日签到",34),
	NEW_HAND("新手任务",35),
	RANK_REBATE("榜单奖励",36),
	EARN_CLICK("每日必赚签到",37),
	POINT("金币兑换",38),
	NEW_MASTER("新版师徒返利",39),
	REAWARD("补偿奖励",40),


	AoTian("傲天任务",1),
	XianWan("闲玩任务",1),
	PCDANDAN("pc蛋蛋享玩",1),
	TAOJIN("91淘金",1),
	LEXIANG("乐享多游",1),
	JUXIANGWAN("聚享玩",1),
	DANDAN_ZHUAN("蛋蛋赚",1),

	NEWS_EARN("新闻赚",39),
	JOKE_EARN("笑话赚",40),
	YW_HZ("鱼玩盒子",41),

	POINT_EARN("走路赚悬浮金币阶段奖励",42),
	SIGMOB("SIGMOB",43),
	LIZI_YD("LIZI_YD",44),
	SHAN_HU_BUSS("珊瑚商城退还积分",45),
	ROUSE_DAY("每日赚点",46),
	KOU_LIN_HONG_BAO("口令红包",47),
	BOOK_CHAPTER("听书章节奖励",48),
	BOOK_TIME("听书时长奖励",49),
	HUNDRED_AWARDS_POINT("百倍金币奖励",50),
	WISH_CAT_CLICK("公交打卡",51),
	MUBIAODACHEN("步数目标达成",52),

	HEISHUI("喝水",55),
	/**
	 * 吃饭
	 */
	CHIFAN("吃饭",56),
	/**
	 * 读书
	 */
	DUSHU("读书",57),
	/**
	 * 运动
	 */
	YUNDONG("运动",58),
	;
	private String title;
	private int index;
	private int type;
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

	private TaskCategory(String title, int index) {
		this.title = title;
		this.index = index;
	}
	
	public static TaskCategory getByIndex(int index) {
		for (TaskCategory e : TaskCategory.values()) {
			if (e.index == index) {
				return e;
			}
		}
		return null;
	}
	
	public static TaskCategory getByTitle(String title) {
		if (null == title) {
			return null;
		}
		for (TaskCategory e : TaskCategory.values()) {
			if (e.title.equals(title)) {
				return e;
			}
		}
		return null;
	}

	public static TaskCategory getByName(String name) {
		if (null == name) {
			return null;
		}
		for (TaskCategory e : TaskCategory.values()) {
			if (e.name().equals(name)) {
				return e;
			}
		}
		return null;
	}
}
